class BarChart
  constructor: (container, options)->
    @initOptions options
    @chart = echarts.init(container)
    @chart.setOption(@defOptions)


  initOptions: (options)->
    @defOptions =
      grid: x: 0, y: 0, x2: 0, y2: 0, borderColor: 'rgba(0,0,0,0)'
      tooltip :   trigger: 'item'
      legend:
        data:['default'],
        show: false
      toolbox: show : false
      calculable : false,
      xAxis : [{
        show: true
        type : 'category'
        boundaryGap : true
        splitLine: show: false
        axisLine: show: false
        axisLabel: show: false
        data: [1..9]
      }]
      yAxis: [{type : 'value',show: false, min: 0, max: 100}]
      series: []
      animation: false

    _.extend @defOptions, options

globalDefined "BarChart", BarChart
